import java.util.ArrayList;
import java.util.List;


class College {
    private List<Building> buildings;
    private List<Course> courses;
    public College() {
        this.buildings = new ArrayList<>();
        this.courses = new ArrayList<>();
    }


    public void addBuilding(Building building) {
        buildings.add(building);
    }


    public void addCourse(Course course) {
        courses.add(course);
    }

    public List<Building> getBuildings() {
        return buildings;
    }


    public List<Course> getCourses() {
        return courses;
    }
}


class Building {
    private String name;
    private String address;

    public Building(String name, String address) {
        this.name = name;
        this.address = address;
    }

    public String getName() {
        return name;
    }

    public String getAddress() {
        return address;
    }

}


class Course {
    private String courseName;
    private Building building;

    public Course(String courseName, Building building) {
        this.courseName = courseName;
        this.building = building;
    }


    public String getCourseName() {
        return courseName;
    }


    public Building getBuilding() {
        return building;
    }


}

// 示例程序
public class Main {
    public static void main(String[] args) {

        Building building1 = new Building("教学楼A", "学院路1号");
        Building building2 = new Building("图书馆", "学院路2号");


        College college = new College();
        college.addBuilding(building1);
        college.addBuilding(building2);


        Course course1 = new Course("数学", building1);
        Course course2 = new Course("物理", building2);
        college.addCourse(course1);
        college.addCourse(course2);


        System.out.println("学院建筑:");
        for (Building building : college.getBuildings()) {
            System.out.println("- " + building.getName() + " (" + building.getAddress() + ")");
        }

        System.out.println("学院课程:");
        for (Course course : college.getCourses()) {
            System.out.println("- " + course.getCourseName() + " 在 " + course.getBuilding().getName());
        }
    }
}